#ifndef BALL_H
#define BALL_H
#include <QPainter>
#include "ishape.h"
class CBall : public IShape
{
private:

    double m_hSpeed = 1;        // 水平速度
    double m_vSpeed = 1;        // 垂直速度
    int m_hDirection = 1;
    int m_vDirection = 1;

public:
    CBall();
    double getHSpeed();
    void setHSpeed(double hSpeed);

    double getVSpeed();
    void setVSpeed(double vSpeed);

    void setHDirection(int hDirection);
    int getHDirection();
    void setVDirection(int vDirection);
    int getVDirection();

    void paint(QPainter *painter);
    void run();
    //void setY(double  y);
};

#endif // BALL_H
